package top.txl.mapper;
//
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import top.txl.Dto.DishDto;
import top.txl.entity.Dish;

import java.util.List;

@Mapper
public interface DishMapper {
//    @Select("insert into dish(id,name, category_id, price, code, image, description, status, sort, create_time, update_time, create_user, update_user,is_deleted) " +
//            "values(null,#{name},#{categoryId},#{price},#{code},#{image},#{description},#{status},#{sort},#{createTime},#{updateTime},#{createUser},#{updateUser},#{isDeleted})")
    void add(DishDto dishDto);

//    @Select("select id, name, category_id, price, code, image, description, status, sort, create_time, update_time, create_user, update_user, is_deleted from dish")
    List<Dish> lists(String keyWords,Integer categoryId);

    Dish detail(Integer id);

    void updateDish(DishDto dishDto);

    void delete(List<Integer> ids);

    void updateStatus(DishDto dishDto);

    List<Dish> frontLists(Integer categoryId);
}
